<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" href="../css/mui.css">
		<style>
			body{
				background: #FFFFFF;
			}
			.mui-bar{
				background:linear-gradient(180deg,rgba(252,126,119,1) 0%,rgba(254,96,93,1) 100%);
			}
			a,.mui-title{
				color:rgba(255,255,255,1);
			}
			.mui-content{
				width:100%;
				position: relative;
				float: left;
				margin-top:51px;
				background: #FFFFFF;
			}
			.partner_one{
				width:calc(96% - 15px);
				position: relative;
				float: left;
				background:rgba(255,236,230,1);
				border-radius:10px;
				margin-left:15px;
			}
			.partner_one>img{
				width:55%;
				height:37.5px;
				position:absolute;
				left:22%;
				top:-19px;
			}
			.one_fir{
				width:100%;
				position: relative;
				float: left;
				padding-top:45.5px;
				padding-bottom:53px;
				box-sizing:border-box;
			}
			.one_fir>p{
				font-size:15px;
				font-family:PingFang-SC-Bold;
				font-weight:bold;
				color:rgba(254,98,95,1);
				padding-left:9.5px;
				box-sizing:border-box;
			}
			.one_fir>span{
				font-size:15px;
				font-family:PingFang-SC-Medium;
				font-weight:500;
				color:rgba(51,51,51,1);
				display:block;
				padding-left:9.5px;
				box-sizing:border-box;
			}
			.partner_btn{
				width:100%;
				position:relative;
				float:left;
				margin-top:77.5px;
			}
			.partner_btn>button{
				width:calc(96% - 15px);
				height:43px;
				margin-left:15px;
				background:linear-gradient(180deg,rgba(252,126,119,1) 0%,rgba(254,96,93,1) 100%);
				box-shadow:0px 5px 8px 0px rgba(254, 95, 99, 0.35);
				border-radius:43px;
				font-size:16px;
				font-family:PingFang-SC-Bold;
				font-weight:bold;
				color:rgba(255,255,255,1);
			}
		</style>
	</head>

	<body contextmenu="return false;">
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">合伙人</h1>
		</header>	
		<div class="mui-content">
			<div class="partner_one">
				<img src="../image/gonggao.png" alt="">
				<div class="one_fir">
					<!-- <p>成为合伙人的条件：</p>
					<span>一、是本应用的会员，缴纳50元会费；</span>
					<span>二、能够遵守本应用的规则，平等互助；</span>
					<span>三、若违规，本平台会取消你的合伙人资格；</span>
					<span>四、是本应用的会员，缴纳50元会费；</span>
					<span>五、能够遵守本应用的规则，平等互助；</span>
					<span>六、若违规，本平台会取消你的合伙人资格；</span> -->
				</div>
			</div>
			<div class="partner_btn">
				<button>立即申请</button>
			</div>
		</div>
		<script src="../js/mui.js"></script>
		<script src="../js/jquery-3.1.1.min.js"></script>
		<script type="text/javascript">
		
			
			
			mui.plusReady(function(){
				var url = plus.storage.getItem('url');
				var user = plus.storage.getItem('user');
				user = JSON.parse(user);
				// mui.alert(user.token)
				$.post(url+'/juyou/hehuo/getren',{token:user.token},function(res){
					// mui.toast(res.msg)
					if(res.code==200){
						if(res.data.hehuo.status==1){
							mui.openWindow({
								url:"subordinate.html",
								id:"subordinate.html"
							})
						}
						
						var gg = res.data.gg;
						var str = '';
						$.each(gg.zhi,function(i,v){
							if(i==0){
								str+='<p>'+v+'</p>';
							}else{
								str+='<span>'+v+'</span>';
							}
						})
						$(".one_fir").empty();
						$(".one_fir").append(str)
						
						
						mui.init({
								                      beforeback: function() {　　　　
								                          var list = plus.webview.currentWebview().opener();　　　　
								                          //refresh是A页面自定义事件
								                          mui.fire(list, 'refresh');
								                          //返回true,继续页面关闭逻辑
								                          return true;
								                      },
								             });
							
							
						//点击立即申请
						mui(".partner_btn").on("tap","button",function(){
							mui.confirm('你确定要申请成为合伙人吗？','提示',['取消','确认'],function (e) {
								if(e.index==1){
									plus.nativeUI.showWaiting();
									$.post(url+'/juyou/hehuo/applyhuohe',{token:user.token},function(res){
										plus.nativeUI.closeWaiting();
										mui.toast(res.msg);
										if(res.code==200){
											setTimeout(function(){
												mui.back();
											},1500)
										}
									})
								}
							},'div')
						})
						
					}else{
						mui.toast(res.msg);
					}
					
				})
				
			})
			
		</script>
	</body>

</html>
